package com.example.selfproperties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 我们经常会配置多个数据源，那么我们有些配置还是希望从application.properties文件中进行读取，那么自然而然的在我们定义的@bean中就需要能够读取配置文件的属性。
 }
 */

//prefix设置key的前缀;
//@ConfigurationProperties(prefix = "com.kfit.company")
//@Component
//@EnableConfigurationProperties({Prop2.class})
public class Prop6 {

    private String name;
    private String location;
    private String mobile;
    private int employCount;

    //配置数组注入
    private List<String> employs = new ArrayList<String>();


    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getLocation() {
        return location;
    }
    public void setLocation(String location) {
        this.location = location;
    }
    public String getMobile() {
        return mobile;
    }
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }
    public int getEmployCount() {
        return employCount;
    }
    public void setEmployCount(int employCount) {
        this.employCount = employCount;
    }

    public List<String> getEmploys() {
        return employs;
    }

    public void setEmploys(List<String> employs) {
        this.employs = employs;
    }



}
